package com.ruoyi.aySys.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.aySys.mapper.PurchaseRecordMapper;
import com.ruoyi.aySys.domain.PurchaseRecord;
import com.ruoyi.aySys.service.IPurchaseRecordService;

/**
 * 购买卡密记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-20
 */
@Service
public class PurchaseRecordServiceImpl implements IPurchaseRecordService 
{
    @Autowired
    private PurchaseRecordMapper purchaseRecordMapper;

    /**
     * 查询购买卡密记录
     * 
     * @param purchaseId 购买卡密记录主键
     * @return 购买卡密记录
     */
    @Override
    public PurchaseRecord selectPurchaseRecordByPurchaseId(String purchaseId)
    {
        return purchaseRecordMapper.selectPurchaseRecordByPurchaseId(purchaseId);
    }

    /**
     * 查询购买卡密记录列表
     * 
     * @param purchaseRecord 购买卡密记录
     * @return 购买卡密记录
     */
    @Override
    public List<PurchaseRecord> selectPurchaseRecordList(PurchaseRecord purchaseRecord)
    {
        return purchaseRecordMapper.selectPurchaseRecordList(purchaseRecord);
    }

    /**
     * 新增购买卡密记录
     * 
     * @param purchaseRecord 购买卡密记录
     * @return 结果
     */
    @Override
    public int insertPurchaseRecord(PurchaseRecord purchaseRecord)
    {
        return purchaseRecordMapper.insertPurchaseRecord(purchaseRecord);
    }

    /**
     * 修改购买卡密记录
     * 
     * @param purchaseRecord 购买卡密记录
     * @return 结果
     */
    @Override
    public int updatePurchaseRecord(PurchaseRecord purchaseRecord)
    {
        return purchaseRecordMapper.updatePurchaseRecord(purchaseRecord);
    }

    /**
     * 批量删除购买卡密记录
     * 
     * @param purchaseIds 需要删除的购买卡密记录主键
     * @return 结果
     */
    @Override
    public int deletePurchaseRecordByPurchaseIds(String[] purchaseIds)
    {
        return purchaseRecordMapper.deletePurchaseRecordByPurchaseIds(purchaseIds);
    }

    /**
     * 删除购买卡密记录信息
     * 
     * @param purchaseId 购买卡密记录主键
     * @return 结果
     */
    @Override
    public int deletePurchaseRecordByPurchaseId(String purchaseId)
    {
        return purchaseRecordMapper.deletePurchaseRecordByPurchaseId(purchaseId);
    }
}
